package com.example.success_v;

import android.app.TabActivity;
import android.content.Intent;
import android.content.res.Resources;
import android.os.Bundle;
import android.widget.TabHost;

@SuppressWarnings("deprecation")
public class MainActivity extends TabActivity {

	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.main);

		Resources res = getResources(); 
		TabHost tabHost = getTabHost();
		TabHost.TabSpec spec; 
		Intent intent; 

		intent = new Intent().setClass(this, Tab1.class);
		spec = tabHost.newTabSpec("onglet1").setIndicator("",res.getDrawable(R.drawable.home_icon)).setContent(intent);
		tabHost.addTab(spec);

		intent = new Intent().setClass(this, Tab2.class);
		spec = tabHost.newTabSpec("onglet2").setIndicator("",res.getDrawable(R.drawable.semaine_icon)).setContent(intent);
		tabHost.addTab(spec);

		intent = new Intent().setClass(this, Tab3.class);
		spec = tabHost.newTabSpec("onglet3").setIndicator("", res.getDrawable(R.drawable.exam_icon)).setContent(intent);
		tabHost.addTab(spec);

		intent = new Intent().setClass(this, Tab4.class);
		spec = tabHost.newTabSpec("onglet4").setIndicator("", res.getDrawable(R.drawable.notes_icon)).setContent(intent);
		tabHost.addTab(spec);

		intent = new Intent().setClass(this, Tab5.class);
		spec = tabHost.newTabSpec("onglet5").setIndicator("", res.getDrawable(R.drawable.vacs_icon)).setContent(intent);
		tabHost.addTab(spec);

		tabHost.setCurrentTab(0);

	}
}